<?php
/**
 * app_config.php           项目配置
 *
 * @author                  mashanling(msl-138@163.com)
 * @date                    2012-09-04 11:42:19
 * @last modify             2012-09-22 09:50:37 by mashanling
 */

!defined('ROOT') && exit('Access Denied');

//核心配置 by mashanling on 2012-09-07 14:09:41
define('IS_LOCAL'              , true);     //是否本地环境
define('APP_DEBUG'             , true);    //调试
define('ADMIN_ID'              , 1);//不可删除站长id
define('ADMIN_ROLE_ID'         , 1);//不可删除，不可编辑权限站长角色id
define('ALLOW_AUTO_OPERATION_FUNCTION'  , ',gmtime,get_client_ip,get_user_id,');//自动填充允许使用函数 by mashanling on 2012-09-07 14:35:45
define('ALLOW_AUTO_VALIDATE_FUNCTION'   , ',validate_dir,');//自动填充允许使用函数 by mashanling on 2012-09-07 14:35:45

//项目路径定义 by mashanling on 2012-09-04 11:34:23
define('RUNTIME_PATH'       , APP_PATH . 'Runtime/'); //运行时目录
define('COMMON_PATH'        , APP_PATH . 'Common/');  //项目公共目录
define('LIB_PATH'           , APP_PATH . 'Lib/');     //项目类库目录
define('CONF_PATH'          , APP_PATH . 'Conf/');    //项目配置目录
define('LANG_PATH'          , APP_PATH . 'Lang/');    //项目语言包目录
define('TMPL_PATH'          , APP_PATH . 'Tpl/');     //项目模板目录
define('HTML_PATH'          , APP_PATH . 'Html/');    //项目静态目录
define('DATA_PATH'          , APP_PATH . 'Data/');   //项目缓存目录 by mashanling on 2012-08-15 09:25:45

//自定义错误类型 by mashanling on 2012-09-12 08:58:04
define('E_APP_EXCEPTION'      , 'E_APP_EXCEPTION');//异常
define('E_APP_INFO'           , 'E_APP_INFO');//信息
define('E_APP_DEBUG'          , 'E_APP_DEBUG');//调试
define('E_APP_SQL'            , 'E_APP_SQL');//SQL

//日志类型 by mashanling on 2012-07-09 11:27:04
//0:sql错误;1:系统错误;2:管理员操作日志;3:无权限操作;4:后台登陆日志;5:非法参数;6:定时任务;7:验证表单错误;8:验证码错误'
define('LOG_TYPE_ALL'                 , -1);//所有日志 by mashanling on 2012-08-20 10:34:23
define('LOG_TYPE_SQL_ERROR'           , 0);
define('LOG_TYPE_SYSTEM_ERROR'        , 1);
define('LOG_TYPE_ADMIN_OPERATE'       , 2);
define('LOG_TYPE_NO_PERMISSION'       , 3);
define('LOG_TYPE_ADMIN_LOGIN_INFO'    , 4);
define('LOG_TYPE_INVALID_PARAM'       , 5);
define('LOG_TYPE_CRONTAB'             , 6);
define('LOG_TYPE_VALIDATE_FORM_ERROR' , 7);//验证表单错误 by mashanling on 2012-08-24 12:36:13
define('LOG_TYPE_VERIFYCODE_ERROR'    , 8);//验证码错误 by mashanling on 2012-08-24 12:44:18
define('LOG_TYPE_LOAD_SCRIPT_TIME'    , 9);//css及js加载时间 by mashanling on 2012-09-06 17:20:32
define('LOG_TYPE_SLOWQUERY'           , 10);//慢查询 by mashanling on 2012-09-12 14:40:41

//验证码类型 by mashanling on 2012-09-22 09:50:31
define('VERIFY_CODE_TYPE_LETTERS'       , 0);//大小写字母(a-zA-Z)
define('VERIFY_CODE_TYPE_LETTERS_UPPER' , 1);//大写字母(A-Z)
define('VERIFY_CODE_TYPE_LETTERS_LOWER' , 2);//小写字母(a-z)
define('VERIFY_CODE_TYPE_NUMERIC'       , 3);//数字(0-9)');
define('VERIFY_CODE_TYPE_ALPHANUMERIC'  , 4);//字母与数字(a-xA-Z0-9)
define('VERIFY_CODE_TYPE_ALPHANUMERIC_EXTEND'  , 5);//字母与数字(a-xA-Z0-9)，排除容易混淆的字符oOLl和数字01


//杂项定义 by mashanling on 2012-09-04 11:44:13
define('REQUEST_TIME'          , $_SERVER['REQUEST_TIME']); //请求时间戳
define('REQUEST_TIME_MICRO'    , microtime(true));          //开始执行时间
define('REQUEST_METHOD'        , isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : 'EMPTY'); //请求方法
define('REQUEST_URI'           , isset($_SERVER['REQUEST_URI']) ? urldecode($_SERVER['REQUEST_URI']) : 'EMPTY'); //请求方法
define('EOL_CR'                , "\r");                       //回车
define('EOL_LF'                , "\n");                       //换行
define('EOL_CRLF'              , EOL_CR . EOL_LF);            //回车换行
define('SESSION_VERIFY_CODE'   , 'verify_code');//验证码session key值 by mashanling on 2012-07-13 16:56:40
define('AUTO_CREATE_COMMENT'   , "//后台自动生成，请毋修改by mashanling\n//最后更新时间:%s" . EOL_LF);//后台生成缓存文件注释说明 by mashanling on 2012-09-04 17:27:22
define('APP_DS'                , '/');//路径分割符 by mashanling on 2012-09-06 14:44:16